@extends('admin/layout/index')
@section('content')
<div class="mws-panel grid_8 mws-collapsible">
    <div class="mws-panel-header">
        <span><i class="icon-table"></i><a href="/admin/sale/goodsadd/{{ $sa_id }}" style='margin-left:950px'>新增商品</a></span>
        
    </div>
    <div class="mws-panel-inner-wrap">
        <div class="mws-panel-body no-padding">
            <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
                <div id="DataTables_Table_0_length" class="dataTables_length">
                    <label>Show
                    <select size="1" name="DataTables_Table_0_length" aria-controls="DataTables_Table_0">
                        <option value="10" selected="selected">10</option>
                        <option value="25">25</option>
                        <option value="50">50</option>
                        <option value="100">100</option>
                    </select>
                     entries</label>
                </div>
                <div class="dataTables_filter" id="DataTables_Table_0_filter">
                    <label>搜索:<input aria-controls="DataTables_Table_0" type="text"></label>
                </div>
                <table class="mws-table mws-datatable dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
                <thead>
                <tr role="row">
                    <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 128px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">
                        商品名称
                    </th>
                    <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 168px;" aria-label="Browser: activate to sort column ascending">
                        商品所属类型
                    </th>
                    <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 158px;" aria-label="Platform(s): activate to sort column ascending">
                        商品销售状态
                    </th>
                    <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 106px;" aria-label="Engine version: activate to sort column ascending">
                        所属品牌
                    </th>
                    <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 76px;" aria-label="CSS grade: activate to sort column ascending">
                        上架时间
                    </th>
                    <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 76px;" aria-label="CSS grade: activate to sort column ascending">
                        库存
                    </th>
                    <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 126px;" aria-label="">
                        操作
                    </th>
                </tr>
                </thead>
                <tbody role="alert" aria-live="polite" aria-relevant="all">
                @foreach( $data as $k => $v )
                <tr class="odd">
                    <td class=" sorting_1">
                       {{ $v['title'] }} ({{ $v['version'] }})
                    </td>
                    <td class=" sorting_1">
                       {{ $v['class'] }}
                    </td>
                    <td class=" ">
                        {{ $v['sale'] }}
                    </td>
                    <td class=" ">
                        {{ $v['brand'] }}
                    </td>
                    <td class=" ">
                        {{ $v['ctime'] }}
                    </td>
                    <td class=" ">
                        {{ $v['num'] }}
                    </td>
                    <td class=" ">
                        <span class="btn-group">
                        <a href="/admin/goods/edit?id={{ $v['id'] }}&ve_id={{ $v['ve_id'] }}" class="btn btn-small" title='编辑商品'><i class="icon-pencil"></i></a>
                        <a href="/admin/goods/image?ve_id={{ $v['ve_id'] }}" class="btn btn-small" title='商品图片'><i class="icon-search"></i></a>
                        <a href="/admin/sale/goodsupdate/{{ $v['id'] }}?sa_id={{ $sa_id }}" class="btn btn-small" title='商品下架'><i class="icon-trash"></i></a>
                        </span>
                    </td>
                </tr>
                 @endforeach
                 </tbody>
                </table>
                <!-- 显示分页 -->
                {!! $data->appends($var)->render() !!}
            </div>
        </div>
    </div>
</div>
@endsection
@section('link')

    <!-- JavaScript Plugins -->
    <script src="/admin/js/libs/jquery-1.8.3.min.js"></script>
    <script src="/admin/js/libs/jquery.mousewheel.min.js"></script>
    <script src="/admin/js/libs/jquery.placeholder.min.js"></script>
    <script src="/admin/custom-plugins/fileinput.js"></script>
    
    <!-- jQuery-UI Dependent Scripts -->
    <script src="/admin/jui/js/jquery-ui-1.9.2.min.js"></script>
    <script src="/admin/jui/jquery-ui.custom.min.js"></script>
    <script src="/admin/jui/js/jquery.ui.touch-punch.js"></script>

    <!-- Plugin Scripts -->
    <script src="/admin/plugins/datatables/jquery.dataTables.min.js"></script>
    <!--[if lt IE/admin/ 9]>
    <script src="js/libs/excanvas.min.js"></script>
    <![endif]-->
    <script src="/admin/plugins/flot/jquery.flot.min.js"></script>
    <script src="/admin/plugins/flot/plugins/jquery.flot.tooltip.min.js"></script>
    <script src="/admin/plugins/flot/plugins/jquery.flot.pie.min.js"></script>
    <script src="/admin/plugins/flot/plugins/jquery.flot.stack.min.js"></script>
    <script src="/admin/plugins/flot/plugins/jquery.flot.resize.min.js"></script>
    <script src="/admin/plugins/colorpicker/colorpicker-min.js"></script>
    <script src="/admin/plugins/validate/jquery.validate-min.js"></script>
    <script src="/admin/custom-plugins/wizard/wizard.min.js"></script>

    <!-- Core Script -->
    <script src="/admin/bootstrap/js/bootstrap.min.js"></script>
    <script src="/admin/js/core/mws.js"></script>

    <!-- Themer Script (Remove if not needed) -->
    <script src="/admin/js/core/themer.js"></script>

    <!-- Demo Scripts (remove if not needed) -->
    <script src="/admin/js/demo/demo.dashboard.js"></script>

@endsection